<template>
  <div>
    <h2 :style="{color:color}">子组件</h2>
    <comp-grandson></comp-grandson>
  </div>
</template>

<script>
import {inject} from "@vue/composition-api";
import grandson from "./grandson";

export default {
  components: {
    "comp-grandson": grandson
  },
  setup() {
    const color = inject("themeColor");
    return {
      color
    };
  }
};
</script>

<style scoped></style>
